Added part of the automatic login piece