Tidied up register login and password reset js