Login register fixes

fixed #421 reset password doesn't work
refactored login / registration
testing of registration / password reset
@dknochen This part we need to discuss.