Separating implementation in Login component.
Following Tim's feedback.