add login helper method