trick to refresh page when user logs in