fixes the loggedin user problem