Modified login and admin type checking