making login & register work