fixing urls for integrated login and some more crazy stuff