Implement authentication functionality