NEW Hook for `Member::registerFailedLogin`

Adding a hook for registerFailedLogin so that it is possible to add some custom logic when a user fails to login

Also rearranged the write as this function could hit the DB up to 3 times. Now it will me 0 or 1 times.
Merge pull request #2560 from TomSpeak/patch-2

NEW Hook for `Member::registerFailedLogin`