Move login and managment to it's own packages and split to classes