Start of conversion to angular for login