Resolve issue with having to refresh page after login