Add user session API and login panel.