scala based identity management