added basic handling for login