finished user login implementation