move main login into app