added routing cleanup and login