model working for reg and sign in