got rid of login loop