writing the login module, have bug in socket auth