Make single call to checkAuth

Make a single call to checkAuth and assign returned function to a variable.