finish logging in and out, add persistant sessions