refactor login resource to be a bit more standard (bug 888075)