basic login and register function v-1