Implement custom authentication