Fixing server side of logging in.