Changed all return messages from alerts into flash messages

I have changed all return messages intended for users (not the ones
for testing purposes) into flash messages. The reason is alerts can
become annoying for users. The other alerts have to be modified later
once we have implemented permissions checking for other functionalities.