fixed login/signup redirection with error msg