Checks for authentication