fixed bugs and half way through reset password functionality