move code to 'login' app