small bug fix in authentication