added login implementation