This "exists" on aggregate like COUNT will always returns true since it always returns some value, so it will never get to visit the "else" part,
if exists(Select COUNT(User_Id) from User_Master where User_Id = @userid and Password = @password)
Try this instead:
if exists(Select 1 from User_Master where User_Id = @userid and Password = @password)