Fixed authentication timeot window as well as other security related issues