Logic for logging in added to adminctrler