pre-login working