Updated user class and added an exception