added login/logout system + minor modifications