added basic login and admin functions