Fix loggedin stuff