added association and has_secure_password method to user model