Fixed some reference errors.
Added login test.