code revision, working login