title: APEX 5 set custom failed login message
body: <p>I'm using a custom login function resulting with a true/false value whenever the user should be allowed to login or not (a standard thing).<br>
  My problem is: when the function returns "false" the standard message is displayed "invalid login credentials" </p>
  
  <p><a href="https://i.stack.imgur.com/A7CXc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A7CXc.png" alt="enter image description here"></a></p>
  
  <p>even if the credentials are correct. Is there any chance to customize this message?<br>
  EXAMPLE: login function checks the credentials (ok) AND some additional, non relevant things (fe if the user is allowed to login into this particular application) (not ok) -> login = false -> invalid credentials message.<br>
  A small workaround that I know of is to raise a user defined exception in the login function but I'd like to omit that scenario as basically the run should be without errors (everything worked and was verified). </p>