Login-function now gets credentials from URL