xhr_login frist draft

just a non working copy of the login functions of hogventure