Added single sign on, fixed a few bugs, added first integration test