crude implementation of login