improve sign in functionality