implemented initial login and user permission