added login & register functionality