A Login function that will perform constant time password comparison and create a new session cookie