added custom preauthentication login method using header values