Add password changes & login refactoring (more...)

Also refactors getLogin(), passes user id into the session, allows for
dropdown links to be recognised properly, change encrypt() to accept the
salt as a second argument, change the way that the user is logged in.