Implemented authentication with tokens