refactored so that /public/login/ now takes a message id 
FIXME - need to figure out a better way of passing around message data