Fix method to get the session key