login and logout refreshes page