Move isAdmin function to a separated file