Added loginSuccessWithCookie and loginFailWithCookie