[SERVER] Split login into seperate method.