null pointer checks for authentication