Additional SQL Server features and topics not covered by specific categories
First, db_securityadmin is a database role, and not a server role, so membership in that role cannot give you rights to create logins. And same goes for db_owner. And you cannot add a login to db_owner, for that you need a database user.
Here is an example of what you should do:
USE master
go
CREATE LOGIN lakritstomte WITH PASSWORD = 'sdgsdfhdfharfhn'
go
ALTER SERVER ROLE securityadmin ADD MEMBER lakritstomte
go
EXECUTE AS LOGIN = 'lakritstomte'
go
CREATE LOGIN extralogin WITH PASSWORD = 'sfdgsdhfearhaerh'
go
REVERT
go
IF suser_id('extralogin') IS NOT NULL
DROP LOGIN extralogin
go
DROP LOGIN lakritstomte
Note that this uses the server role securityadmin.
On the other hand, adding a user to db_owner, is not sufficient to create logins:
USE master
go
CREATE LOGIN lakritstomte WITH PASSWORD = 'sdgsdfhdfharfhn'
go
CREATE USER lakritstomte
ALTER ROLE db_owner ADD MEMBER lakritstomte
go
EXECUTE AS LOGIN = 'lakritstomte'
go
CREATE LOGIN extralogin WITH PASSWORD = 'sfdgsdhfearhaerh'
go
REVERT
go
IF suser_id('extralogin') IS NOT NULL
DROP LOGIN extralogin
go
DROP USER lakritstomte
DROP LOGIN lakritstomte