Added more login/logout features, edited base