added registration and login functions (local DB only for testing)