Login and cookies

Changed get current url utility function to use STANDARD_URL and don't set domain explicitly. Also fixes login redirect.