fixed login and resistration issues