move main login to abstract controller