Login register fixes

fixed #421 reset password doesn't work
refactored login / registration
testing of registration / password reset