Added login/out function and trying out regex