fixed issue with redirect upon successful login