Bug 1091261 - Implement login 3.0

no clue, I copy and pasted this code from above