Finished server login implementation