Modified redir->login functionality to use form