added basecontroller for logging users.