Implement session authentication.