login, register and forgot password updated to include error handling.