implemented retrieve password functionality in model and server