Added more comments for auth.php class and functions