make authentication methods more readable (thanks @fsmanuel)