Implement better authentication