Moved user to a separate file and added Pre/Post Login/Logout